package test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Transactional;

import com.cplatform.movie.back.sys.dao.UserDao;
import com.cplatform.movie.back.sys.service.UserService;


@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"../spring-configuration/*.xml"})
@Transactional
/** 声明事务回滚     true：回滚 **/
@TransactionConfiguration(transactionManager="transactionManager",defaultRollback=true)

public class SpringJunit {
	
	@Autowired
	private UserDao userDao;
	
	
	@Test
	public void testFindUser() {
//		System.out.println(userDao.findByIdOrEmail(0l, "").getId()!=null);
		System.out.println(userDao.findByUserCodeAndUserPwd("system1", "568c57617ab34d3532106cdf856c8b49"));
	}
	
	
	
	
	
	
	
	
	
	
	
}
